SET(buildenv ${CMAKE_SOURCE_DIR}/gbl.buildenv)
MESSAGE(STATUS "Build environment located in : " ${buildenv})
INCLUDE(${buildenv}/macros/dirlist.cmake)
SUBDIRLIST(alldirs ${CMAKE_SOURCE_DIR})
FOREACH(dir ${alldirs})
    CONTAINS(excluded "exclude" ${CMAKE_SOURCE_DIR}/${dir})
	CONTAINS(isSvn ".svn" ${CMAKE_SOURCE_DIR}/${dir})
    IF(NOT "${excluded}" STREQUAL "YES" AND NOT "${isSvn}" STREQUAL "YES")
        MESSAGE(STATUS "Adding directory: " ${dir})
        ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${dir})
    ELSE()
        MESSAGE("skipping directory: " ${dir})
    ENDIF()
ENDFOREACH()
